<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>

		<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
	</head>
	<body>
		<div id="app">
			{{message}}
			<!--对应js代码 -->
			<button v-on:click="count -= 1">-</button>
			{{count}}
			<button v-on:click="count += 1">+</button>
			
			<button v-on:click="greet">Greet</button>
			<button @click="greet">Greet</button>
			
		</div>
		
		<script>
			var app = Vue.createApp({
				data() {
					return {
						"message": "Hello Vue!",
						count:0
					}
				},
				methods:{
					
					greet:function(){
						alert(this.message)
					}
					
				}
			});
			var vm = app.mount("#app")
		</script>



	</body>
</html>